home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_8 / issue_06 / risc_os / kernel / VDUChanges < prev    next >
Encoding:
Text File  |  1988-09-28  |  10.0 KB  |  227 lines

  1. ; > &.Doc180.Kernel.VDUChanges
  2.  
  3. Title:          RISC OS Changes/1
  4. Version:        0.08
  5. Started:        18-Jan-88
  6. Last updated:   28-Sep-88
  7.  
  8. Changes between Arthur OS and RISC OS 2.00
  9. ==========================================
  10.  
  11. Bug fixes (numbers in brackets indicate the bug number in Bugs.1-20)
  12. ---------
  13. (502) Flushing the printer buffer no longer zeroes the printer handle.
  14. (512) The MOS now range-checks the key number before looking it up in the
  15.       translation table in a keyboard handler.
  16. (516) Line fills to the right no longer corrupt the external graphics
  17.       cursor.
  18. (518, 520) *SCREENLOAD now generates errors correctly
  19. (521) *SCREENLOAD now sets the supremacy bit correctly.
  20. (522) *SCREENLOAD no longer leaves the cursor on if it needs to change mode.
  21. (524) SpriteOp 'Return nth name' now checks for overflowing the name buffer
  22. (531) SWI OS_Plot now checks the FX3 status, the VDU queue status and the
  23.       spool handle correctly.
  24. (538) SpriteOp ReadPixelColour now works correctly in 256 colour modes.
  25. (539) Latch B is now initialised to 0 on reset.
  26. (572) Circular segments are now plotted correctly.
  27. (593) The VDU variables WindowWidth and WindowHeight now return correct values
  28.       in all cases.
  29. (594) The horizontal interlace register (HIR) is now programmed correctly in
  30.       hi-res-mono modes.
  31.  
  32. Hardware bug fix
  33. ----------------
  34. The OS no longer writes to the ACIA control register if the value it is
  35. programming in it is the same as the current value. This cures problems with
  36. GTE/CMD chips which corrupt receive characters if the control register is
  37. written to at certain times.
  38.  
  39. International keyboards
  40. -----------------------
  41. Some international keyboards have an extra key to the right of the left-hand
  42. shift key. This now has an INKEY(-ve) number associated with it. INKEY(-95)
  43. returns -1 if this key is down, 0 otherwise. Linked with this is an internal
  44. key number of 94 returned by OSBYTEs &79 and &7A (scan keyboard).
  45.  
  46. New calls to set ECF origin
  47. ---------------------------
  48. VDU 23,17,6,x;y;0,0,0 or SWI OS_SetECFOrigin (&56) with R0=x, R1=y
  49.  
  50. Under Arthur OS (and on earlier BBC machines) the ECF pattern was always
  51. aligned so that the bottom left of the pattern coincided with the bottom left
  52. of the screen. These calls makes the bottom left of the pattern coincide with
  53. the point (x,y). The origin is restored to bottom left on a mode change.
  54.  
  55. New call - VDU 23,17,7,flags,x;y;0,0 - Set character size
  56. ---------------------------------------------------------
  57. where flags consists of bit 0 = 1 => set size of VDU 4 chars (not implemented)
  58.                         bit 1 = 1 => set size of VDU 5 chars
  59.                         bit 2 = 1 => set spacing of VDU 5 chars
  60. and x, y are the size of, or spacing between characters in pixels. VDU 5
  61. sizes of 8x8 and 8x16 are optimised for speed; other sizes call the SprExtend
  62. module to plot scaled chars (much slower). Setting different VDU 5 spacing
  63. does not affect speed. The default size and spacing of VDU 5 chars is 8x8;
  64. the default size of VDU 4 chars is 8x8 except in mode 23, when it is 8x16;
  65. the default spacing of VDU 4 chars is the same as the sizes, except in gap
  66. modes when it is 8x10. The sizes and spacings are reset on a mode change.
  67.  
  68. The sizes and spacing can be read by calling SWI OS_ReadVduVariables with the
  69. following indices:-
  70.  
  71. GCharSizeX  (162) - x size of VDU 5 chars (in pixels), default 8
  72. GCharSizeY  (163) - y size of VDU 5 chars (in pixels), default 8
  73. GCharSpaceX (164) - x spacing of VDU 5 chars (in pixels), default 8
  74. GCharSpaceY (165) - y spacing of VDU 5 chars (in pixels), default 8
  75. TCharSizeX  (167) - x size of VDU 4 chars (in pixels)
  76. TCharSizeY  (168) - y size of VDU 4 chars (in pixels)
  77. TCharSpaceX (167) - x spacing of VDU 4 chars (in pixels)
  78. TCharSpaceY (168) - y spacing of VDU 4 chars (in pixels)
  79.  
  80. New calls to read ECF patterns, dot-dash pattern
  81. ------------------------------------------------
  82. OSWORD 10 (normally for reading character definitions) has been extended. By
  83. putting codes corresponding to non-printable characters in byte 0 of the
  84. control block, other information can be read as follows:-
  85.  
  86. Value in block     Information returned in bytes 1 to 8
  87.         2               Ecf pattern 1 (in native mode)
  88.         3               Ecf pattern 2 (------""------)
  89.         4               Ecf pattern 3 (------""------)
  90.         5               Ecf pattern 4 (------""------)
  91.         6               Dot-dash pattern
  92.  
  93. Address of HLine exported
  94. -------------------------
  95. Vdu variable HLineAddr (index 166) returns the address of a fast horizontal
  96. line-drawing routine. The routine is called as follows:-
  97.  
  98. in:     R0,R2 = left and right x-coordinates of ends of line (in any order)
  99.         R1 = y-coordinate of line
  100.         R3 = 0 => plot with no action (ie do nothing)
  101.         R3 = 1 => plot using foreground colour and action
  102.         R3 = 2 => invert current screen colour
  103.         R3 = 3 => plot using background colour and action
  104.         R3 >= 4 => R3 -> colour block
  105.         R14 = return address (routine exits with equivalent of MOV PC,R14)
  106.         MUST be entered in SVC mode
  107.  
  108. out:    All registers preserved (except for PSR)
  109.  
  110. All coordinates are in terms of pixels from the bottom left of the screen.
  111. The line is clipped to the graphics window, and is plotted using the colour
  112. and action specified by R3.
  113.  
  114. If R3>=4 then R3 points to a colour block, which starts on an address which
  115. is a multiple of 64, and has the following format:-
  116.  
  117. Offset          Value
  118.  
  119. 0               OR  mask for top ECF line
  120. 4               EOR mask -------""-------
  121. 8               OR  mask for next ECF line
  122. 12              EOR mask -------""--------
  123. .               .
  124. .               .
  125. 56              OR  mask for bottom ECF line
  126. 60              EOR mask --------""---------
  127.  
  128. NB the bottom ECF line here would be used on the bottom line of the screen
  129. (ie it must be pre-adjusted to take the ECF origin into account.)
  130.  
  131. The caller should previously have called SWI OS_RemoveCursors to remove the
  132. software cursor (and should call SWI OS_RestoreCursors to put it back
  133. afterwards).
  134.  
  135. Address of current GCOL colour blocks exported
  136. ----------------------------------------------
  137. Vdu variable GcolOraEorAddr (index 171) returns the address of colour blocks
  138. for the current GCOLs. If the value returned is n, then
  139.  
  140. n+&00..n+&3F is a colour block for the foreground colour + action
  141. n+&40..n+&7F is a colour block for the background colour + action
  142. n+&80..n+&BF is a colour block for the background colour with store action
  143.  
  144. (for the definition of a colour block, see above). These colour blocks are
  145. updated whenever a GCOL or TINT is issued or the ECF origin is changed. They
  146. are intended for use by external programs which want to access screen memory
  147. directly but which want to have access to the current colour/action settings.
  148.  
  149. New configuration option - MouseStep n (in range -128 to 127, excluding 0)
  150. --------------------------------------------------------------------------
  151. Under Arthur OS the mouse step multipliers (x and y) are set to 1 on a reset.
  152. In RISC OS 2.00 they are set to the value configured.
  153.  
  154. Modes 11, 14, 16, 17, 23 now allow graphics
  155. -------------------------------------------
  156. Under Arthur OS the above modes do not allow graphics operations (they are
  157. ignored). These modes now do allow graphics, though the user should note the
  158. following:-
  159.  
  160. a) The size of the screen in coordinates is no longer always 1280 by 1024. The
  161.    size of the screen should be determined by reading VDU variables XWindLimit,
  162.    YWindLimit, XEigFactor, YEigFactor. Consequently the variable YShftFactor is
  163.    no longer able to express the full situation, and should not be used.
  164.  
  165. b) In modes 16 and 17, circles (and arcs, sectors and segments) do not look
  166.    circular. This is because the aspect ratio of the pixels is not in a
  167.    2:1, 1:1 or 1:2 ratio, which are the only ratios the OS can cope with at
  168.    present.
  169.  
  170. c) In mode 23, VDU 5 text is single height (by default), not double height
  171.    like VDU 4 text. (This may change if considered sufficiently undesirable).
  172.    XEigFactor and YEigFactor are both 1 (not 0 as on 1.20, so default mouse
  173.    rectangle will be different)
  174.  
  175. d) Modes 3, 6 and 7 still do not allow graphics, for compatibility with
  176.    programs written for earlier BBC machines.
  177.  
  178. e) Modes 11, 14 and 17 are not a multiple of eight pixels high. In these modes
  179.    the bottom line of the screen corresponds to the bottom line of ECF patterns
  180.    (by default), but the top line will not correspond to the top line of ECF
  181.    patterns (by default).
  182.  
  183. Hi-Res-Mono
  184. -----------
  185. Mode 22 has been removed, and Mode 23 is now 1152 x 896 (1 bit per pixel), at
  186. a frame rate of 64.4 Hz.
  187.  
  188. VIDC parameters changed
  189. -----------------------
  190. Some of the VIDC parameters for modes 18,19 and 20 have been altered to
  191. correct the problem with the pointer at the right hand edge of the screen. No
  192. problems should now be encountered, providing the mouse rectangle is not
  193. larger than the display area of the screen (problems still occur with the
  194. pointer in the right hand border area - this is a VIDC problem and cannot be
  195. avoided).
  196.  
  197. Callback vector
  198. ---------------
  199. When RDCH/INKEY(+ve) is idling, waiting for a key to be pressed, then it will
  200. call the callback vector (introduced in RISC OS 2.00) if an appropriate
  201. callback has been requested.
  202.  
  203. New module - IIC - See document IIC/1 for details
  204. ----------------
  205.  
  206. Vdu output to sprites
  207. ---------------------
  208. A mechanism is available for switching VDU output to act directly on a sprite.
  209. The mechanism provides facilities for preserving VDU context while switching.
  210. For more details, see the document "VDU output to sprites/1"
  211.  
  212. Mode extensions
  213. ---------------
  214. A mechanism is available to allow modules to provide extra screen modes and
  215. extra monitor types. For more details, see the document "Mode extensions/1"
  216.  
  217. Other changes
  218. -------------
  219. Block copy/move is faster when the address difference between source and
  220. destination is a whole number of words (eg when copying vertically).
  221.  
  222. Flood fill is a lot faster (up to 10 times as fast for large areas).
  223.  
  224. ScreenLoad and ScreenSave are a lot faster if the window is full screen width.
  225.  
  226. VDU 5 text is about 20% faster.
  227.